﻿
namespace EventBusNet6.Controllers
{
    [ApiController]
    [Route("api/[controller]")]
    public class RabbitMQController : ControllerBase
    {
        [HttpGet]
        public string Get()
        {
            return "OK";
        }
        [HttpGet]
        [Route("/sampleprod")]
        public string SampleProd()
        {
            ProducerConsumerHelper.SimpleSendMessage();
            return "OK";
        }
        [HttpGet]
        [Route("/samplecons")]
        public string SampleCons()
        {
            ProducerConsumerHelper.SimpleConsumerMessage();
            return "OK";
        }
        [HttpGet]
        [Route("/fanoutprod")]
        public  string FanoutProd()
        {
            ProducerConsumerHelper.FanoutSendMessage();
            return "OK";
        }
        [HttpGet]
        [Route("/fanoutcons")]
        public string FanoutCons()
        {
            ProducerConsumerHelper.FanoutConsumerMessage();
            return "OK";
        }
        [HttpGet]
        [Route("/directprod")]
        public string DirectProd()
        {
            ProducerConsumerHelper.DirectSendMessage();
            return "OK";
        }
        [HttpGet]
        [Route("/directcons")]
        public string DirectCons()
        {
            ProducerConsumerHelper.DirectConsumerMessage();
            return "OK";
        }
        [HttpGet]
        [Route("/topicprod")]
        public string TopicProd()
        {
            ProducerConsumerHelper.TopicSendMessage();
            return "OK";
        }
        [HttpGet]
        [Route("/topiccons")]
        public string TopicCons()
        {
            ProducerConsumerHelper.TopicConsumerMessage();
            return "OK";
        }
    }
}
